<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container1,
        .container2 {
            width: 500px;
            height: 500px;
        }
    </style>
</head>

<body>
    <div class="container1"></div>
    <div class="container2"></div>
    <!-- 1引入 -->
    <script src="./echarts.min.js"></script>
    <script>
        const myChart1 = echarts.init(document.querySelector(".container1"));
        const myChart2 = echarts.init(document.querySelector(".container2"));

        const option1 = {
            xAxis: {
                data: ["星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"]
            },
            yAxis: {},
            series: {
                type: 'line',
                data: [100, 200, 100, 111, 222, 333, 444]
            }

        }
        var option2 = {
            title: {
                text: '吃饭'
            },
            series: {
                type: 'pie',
                data: [
                    { name: '吃饭', value: 20 },
                    { name: '吃饭', value: 20 },
                    { name: '打豆豆', value: 20 },
                    { name: '打代码', value: 20 },
                    { name: '哈哈', value: 20 },
                    { name: '哦哦', value: 20 },
                    { name: '啊啊', value: 20 },
                ]
            },
            legend: {
                orient: "vertical",
                left: "left",
                data: ["吃饭", "啊啊", "打代码"]
            },
        }


        myChart1.setOption(option1);
        myChart2.setOption(option2);
    </script>
</body>

</html>